//
//  ViewController.m
//  解析
//
//  Created by lanou3g on 16/1/14.
//  Copyright © 2016年 WHB. All rights reserved.
//

#import "ViewController.h"
#import "Nuomishuo.h"


@interface ViewController ()

@property (nonatomic,strong)NSMutableArray *array;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    //商户
//    NSString *httpUrl = @"http://apis.baidu.com/baidunuomi/openapi/shopinfo";
//    
//    NSString *httpArg = @"shop_id=1745896";
    //城市
//    NSString *httpUrl = @"http://apis.baidu.com/baidunuomi/openapi/cities";
//    NSString *httpArg = @"";
    
//  团单
//    NSString *httpUrl = @"http://apis.baidu.com/baidunuomi/openapi/dealdetail";
//    NSString *httpArg = @"deal_id=2327781";

    //城市下的区
//      NSString *httpUrl = @"http://apis.baidu.com/baidunuomi/openapi/districts";
//        NSString *httpArg = @"city_id=2400010000";/*来接城市中的city_id*/
    
    
    //团单(如 美食,)
//    NSString *httpUrl = @"http://apis.baidu.com/baidunuomi/openapi/categories";
//    NSString *httpArg = @"";
    
    //团单id
//    NSString *httpUrl = @"http://apis.baidu.com/baidunuomi/openapi/dealshops";
//    NSString *httpArg = @"city_id=100010000&deal_id=1228062";/*来接城市中的city_id*/
    
    //根据查询条件获取相应团单


    NSString *httpUrl = @"http://apis.baidu.com/baidunuomi/openapi/searchdeals";
    NSString *httpArg = @"city_id=100010000&cat_ids=326&subcat_ids=962%2C994&district_ids=394%2C395&bizarea_ids=1322%2C1328&location=116.4374%2C39.8719&keyword=%E9%87%91%E9%BC%8E%E8%BD%A9&radius=3000&sort=0&page=1&page_size=10&is_reservation_required=0";
    
    //根据查询条件获取查询的商户信息
    
//        NSString *httpUrl = @"http://apis.baidu.com/baidunuomi/openapi/searchshops";
//        NSString *httpArg = @"city_id=100010000&cat_ids=326&subcat_ids=962%2C994&district_ids=394%2C395&bizarea_ids=1322%2C1328&location=116.418993%2C39.915597&keyword=%E4%BF%8F%E6%B1%9F%E5%8D%97&radius=3000&page=1&page_size=5&deals_per_shop=10";
    Nuomishuo *manger = [[Nuomishuo alloc]init];
   NSMutableArray *array = [manger request:httpUrl withHttpArg:httpArg];
    

}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
